//
//  ArticalVideoTableViewCell.m
//  MyProject
//
//  Created by dllo on 15/10/29.
//  Copyright © 2015年 蓝鸥科技. All rights reserved.
//

#import "ArticalVideoTableViewCell.h"
#define WIDTH ([UIScreen mainScreen].bounds.size.width/375)
#define HEIGH ([UIScreen mainScreen].bounds.size.height/667)
@implementation ArticalVideoTableViewCell
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.bgImage = [[UIImageView alloc]init];
        [self.contentView addSubview:self.bgImage];
        
        self.view = [[UIView alloc]init];
        self.view.backgroundColor = [UIColor blackColor];
        self.view.alpha = 0.2;
        [self.bgImage addSubview:self.view];
        
        self.actionImage = [[UIImageView alloc]init];
        self.actionImage.image = [UIImage imageNamed:@"iconfont-kaishi@2x.png"];
        [self.contentView addSubview:self.actionImage];
        
        self.titleLabel = [[UILabel alloc]init];
        self.titleLabel.font = [UIFont systemFontOfSize:17 * WIDTH * HEIGH];
        self.titleLabel.numberOfLines = 0;
        [self.titleLabel sizeToFit];
        [self.contentView addSubview:self.titleLabel];
        
        self.describLabel = [[UILabel alloc]init];
        self.describLabel.numberOfLines = 0;
        [self.describLabel sizeToFit];
        self.describLabel.font = [UIFont systemFontOfSize:13 * WIDTH * HEIGH];
        [self.contentView addSubview:self.describLabel];
        
        self.avatar_largeImage = [[UIImageView alloc]init];
        [self.contentView addSubview:self.avatar_largeImage];
        
        self.screen_nameLabel = [[UILabel alloc]init];
        self.screen_nameLabel.font = [UIFont systemFontOfSize:13 * WIDTH * HEIGH];
        [self.contentView addSubview:self.screen_nameLabel];
        
        self.wechat_uidLabel = [[UILabel alloc]init];
        [self.contentView addSubview:self.wechat_uidLabel];
        
        self.typeImage = [[UIImageView alloc]init];
        self.typeImage.image = [UIImage imageNamed:@"iconfont-iconfontlingxing@2x.png"];
        [self.contentView addSubview:self.typeImage];
        
        self.typeLabel = [[UILabel alloc]init];
        self.typeLabel.textColor = [UIColor whiteColor];
        self.typeLabel.font = [UIFont systemFontOfSize:12 * WIDTH * HEIGH];
        [self addSubview:self.typeLabel];
        
        
    }
    return self;
    
}
- (void)layoutSubviews
{
    [super layoutSubviews];
    self.bgImage.frame = CGRectMake(10 * WIDTH,10 * HEIGH, self.contentView.bounds.size.width- 20 * WIDTH, 250 * HEIGH);
    self.view.frame = self.bgImage.bounds;
    self.actionImage.frame = CGRectMake((self.contentView.bounds.size.width/2) - 50 * WIDTH, 80 * HEIGH, 80 * WIDTH, 80 * HEIGH);
    self.titleLabel.frame = CGRectMake(60 * WIDTH, 260 * HEIGH, self.contentView.bounds.size.width- 20 * WIDTH, 50 * HEIGH);
    self.describLabel.frame = CGRectMake(60 * WIDTH, 310 * HEIGH, self.contentView.bounds.size.width-80 * WIDTH, 50 * HEIGH);
//    self.avatar_largeImage.frame = CGRectMake(60, 360, 20, 20);
////    self.wechat_uidLabel.frame = CGRectMake(50, 220, 100, 30);
//    self.screen_nameLabel.frame = CGRectMake(100, 360, 20, 100);
    self.typeImage.frame = CGRectMake(10 * WIDTH, 270 * HEIGH, 30 * WIDTH, 30* HEIGH);
    self.typeLabel.frame = CGRectMake(12 * WIDTH, 272 * HEIGH, 28 * WIDTH, 28 * HEIGH);
    
    
}

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
